import random as  rd
i=0
number = rd.randint(0,100)
while i<=9:
    guess = int(input("请输入您猜的数字："))
    if guess==number:
        print("恭喜你答对了")
        i=10
    if guess<number:
        print("你猜小了")
        i=i+1
        print(f"你还有{10-i}次机会")
    if guess>number:
        print("你猜大了")
        i=i+1
        print(f"你还有{10-i}次机会")
    if i>9:
        print("您的次数用尽了")





